package com.shensi.api.pay.client.fallback;


import com.shensi.api.pay.client.MemberClient;
import feign.hystrix.FallbackFactory;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author mao
 */
@Slf4j
@Component
public class MemberClientFallBack implements FallbackFactory<MemberClient> {

    @Setter
    private Throwable cause;

    @Override
    public MemberClient create(Throwable throwable) {
        //失败回调
        log.error("微服务接口调用失败： {}", throwable.getMessage());
        return null;
    }
}
